package com.example.demo.generation.service.impl;


import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.example.demo.generation.entity.Columns;
import com.example.demo.generation.service.ColumnsService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author weifucheng
 */
@Service
public class ColumnsServiceImpl extends ServiceImpl<com.example.demo.generation.mapper.ColumnsMapper, Columns> implements ColumnsService {
    @Autowired
    com.example.demo.generation.mapper.ColumnsMapper columnsMapper;

	@Override
	public List<Columns> selectBySeachParam(Map<String, Object> searchParam, Page<Columns> page) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Columns> selectBySeachParam(Map<String, Object> searchParam) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Columns> selectAll() {
		// TODO Auto-generated method stub
		return columnsMapper.selectAll();
	}

	@Override
	public List<Columns> selectBySql(String sql) {
		// TODO Auto-generated method stub
		return columnsMapper.selectBySql(sql);
	}
	
	@Override
	public List<Columns> selectByTable(String tableName,String tableSchema) {
		// TODO Auto-generated method stub
		return columnsMapper.selectBySql("select * from INFORMATION_SCHEMA.Columns where  table_name='"+tableName+"' and table_schema='"+tableSchema+"'");
	}
}
